import javafx.scene.canvas.GraphicsContext;
import javafx.scene.image.Image;

public class Background extends Sprite{
    //背景
    public Background() {
        super(new Image("startBack.jpg"), 0, 0, 7328, 600);
    }

    @Override
    public void pain(GraphicsContext graphicsContext) {
        super.pain(graphicsContext);
        //判断人物是否移动到屏幕中间位置，如果是则移动背景
        if (MarioBros.Bj){
            x-= MarioBros.SuDu;
        }else {}
    }
}
